package com.xcc.feign.modules.controller.serivce;
import com.xcc.common.entry.User;
import com.xcc.common.result.ResultBody;
import com.xcc.feign.modules.controller.serivce.error.UserServiceError;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author frosty
 * @description
 * @date 2019-11-08 08:09:35
 */
@FeignClient(value = "user-server",fallback = UserServiceError.class)
@Component
public interface UserFeignService {
        /*自带负载均衡 这个注解不加好像也可以*/
      @PostMapping(value = "/register")
      ResultBody  register(User user);

      @GetMapping("/find/{id}")
      ResultBody find(@PathVariable("id") String id);



}
